import fly from "../main"

/**
 * 添加认证信息
 * @param $body
 * @returns {Promise<{}>}
 */
export async function addAuthorization($body) {
  let response = {}
  await fly.post(`/v2/authorization`, $body).then((res) => {
    response = res.data
  })
  return response;
}

/**
 * 获取认证详情
 * @param $id
 * @returns {Promise<{}>}
 */
export async function getAuth($id) {
  let response = {}
  await fly.get(`/v2/authorization/${$id}`).then((res) => {
    response = res.data
  })
  return response;
}
